using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Web.UI.WebControls;

namespace Org.Eurekaa.DNJ.Ext.UI.WebControls
{
    public class ImageCollection : CollectionBase
    {
        public ImageCollection()
        {
        }

        /// <summary>
        /// Indexer property for the collection that returns and sets an item
        /// </summary>
        public Image this[int index]
        {
            get
            {
                return (Image)this.List[index];
            }
            set
            {
                this.List[index] = value;
            }
        }

        /// <summary>
        /// Adds a new error to the collection
        /// </summary>
        public void Add(Image img)
        {
            this.List.Add(img);
        }

        public void Insert(int index, Image item)
        {
            this.List.Insert(index, item);
        }

        public void Remove(Image img)
        {
            List.Remove(img);
        }

        public bool Contains(Image img)
        {
            return this.List.Contains(img);
        }

        //Collection IndexOf method 
        public int IndexOf(Image item)
        {
            return List.IndexOf(item);
        }

        public void CopyTo(Image[] array, int index)
        {
            List.CopyTo(array, index);
        }

    }

    //public class ImageCollection: ArrayList
    //{

        
    //    public int Add(object image)
    //    {
    //        return base.Add(image);
    //    }
    //    public void Clear()
    //    {
    //        base.Clear();
    //    }

    //    public bool Contains(object item)
    //    {
    //        return base.Contains(item);
    //    }


    //    public ImageCollection(ICollection c)
    //        : base(c)
    //    {
    //    }

    //    public ImageCollection()
    //        : base()
    //    {
    //    }


    //}


}
